#ifndef wu_XML_KEY_MANAGER_H
#define wu_XML_KEY_MANAGER_H

#pragma once
#include "ofMain.h"
#include "ofxXmlSettings.h"

class wuXMLkeyManager
{
    public:
        wuXMLkeyManager();
        ~wuXMLkeyManager();

        void draw(int _x, int _y);
		virtual void loadXML(string _filename, bool _bLoop=false);
		virtual void saveXML(string _filename);
		virtual bool getFrame(int i);
		virtual bool getNextFrame();
		virtual bool getPrevFrame();
		virtual void addFrame (bool _key);
		virtual void deleteFrame (int i);
		virtual void clear();
		virtual int getNumFrames();
		virtual int getCurrentFrame();
		virtual void setCurrentFrame(bool _key);
		virtual void goto0();
		virtual void gotoFrame(int _frame);
		int getPrevActiveFrame();
		int getNextActiveFrame();

		ofxXmlSettings XML;
		ofxXmlSettings XMLsave;

		int num_pieces;
		int num_frames;

		// frameInfo: un vector de pieceInfos (de num_pieces elements)
		// filmInfo: un vector de frameInfos (de num_frames elements)
		vector < bool > filmInfo;

		int current_frame;
		bool bLoop;
};
#endif

